/*
 * UniverseObject.java
 *
 * Version 1.0
 * Copyright 2011 BobSoft Inc
 */
package edu.gatech.galaxy.model;

import java.io.Serializable;

import edu.gatech.galaxy.model.types.Location2D;

/**
 * abstract class for all objects in the game
 * @author Robert
 * @version 1.0
 *
 */
public abstract class UniverseObject implements Serializable {
     /**
     * Current version
     */
    private static final long serialVersionUID = 1L;
    
    /**
      * The name of this object
      */
     private final String name;
     
     /**
      * The location of this object
      */
     private final Location2D location;
     
     /**
      * Constructor for UniverseObject.
      * @param pname name of this object
      * @param plocation the location of this object
      */
     public UniverseObject(String pname, Location2D plocation) {
         name = pname;
         location = plocation;
     }
     
     public UniverseObject(String pName) {
         this(pName, new Location2D(0, 0));
     }
     
     /**
      * Method getName.
      * @return String the name of this object
      */
     public String getName() {
         return name;
     }
     
     /**
      * Method getLocation.
      * @return the location of this object
      */
     public Location2D getLocation() {
         return location;
     }
     
     
}
